<html>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<head>
<title>Section 2.1.&nbsp; Developing Locally</title>
<link rel="STYLESHEET" type="text/css" href="images/style.css">
<link rel="STYLESHEET" type="text/css" href="images/docsafari.css">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=learnphpmysql-CHP-2.html><img src="images/prev.gif" width="60" height="17" border="0" align="absmiddle" alt="Previous Page"></a>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=learnphpmysql-CHP-2-SECT-2.html><img src="images/next.gif" width="60" height="17" border="0" align="absmiddle" alt="Next Page"></a>
</div></td></tr></table>
<br><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top"><a name="learnphpmysql-CHP-2-SECT-1"></a>
<h3 id="title-IDAENAXG" class="docSection1Title">2.1. Developing Locally</h3>
<a name="IDX-CHP-2-0040"></a> 
<a name="IDX-CHP-2-0041"></a> 

<p class="docText">Developing your construct on your local computer is the recommended way to learn, since you can interact with all of the components on your own machine and not risk causing problems on a production server. That way, if there are problems in the local environment, you can fix them immediately without exposing them to your site's visitors. Working with your files locally means that you don't have to FTP them to a server, you don't have to be connected to the Internet, and you know exactly what's installed since you did it yourself.</p>
<p class="docText">There are three components to install:</p>
<ul><li><p class="docList">Apache</p></li><li><p class="docList">PHP</p></li><li><p class="docList">MySQL</P></li></ul>
<p class="docText">You will install the programs in that order. All our examples will be from the installation perspective of a PC with Windows installed, with notes for the Macintosh.</P>
<a name="learnphpmysql-CHP-2-SECT-1.1"></a>
<H4 id="title-IDAGOAXG" class="docSection2Title">2.1.1. Installing Apache</h4>
<a name="IDX-CHP-2-0042"></a> 

<p class="docText">First, Apache needs to be installed and operational before PHP and MySQL can be installed, or else they won't work correctly. Plus, there wouldn't be any use for the coding application and database without the Apache web server. A web server delivers web pages, has an IP address, and might have a domain name. For example, if you enter <a class="docLink" target="_blank" href="http://www.oreilly.com/">http://www.oreilly.com/</a> in your browser, this sends a request to the server whose domain name is oreilly.com. The server fetches the page named <span class="docEmphasis">index.html</span> and sends it to your browser.</P>
<p class="docText">Any computer can be turned into a web server by installing server software and connecting the machine to the Internet, which is why you need to install Apache.</p>
<div style="font-weight:bold"><ol class="docList" type="1"><li><div style="font-weight:normal"><p class="docList">Download the Apache 2.0.5 Win32 binary. It's downloadable from <a class="docLink" target="_blank" href="http://httpd.apache.or/download.cgi">http://httpd.apache.or/download.cgi</a>. The file that you save to your desktop is called <span class="docEmphasis">apache2_0.55-win32-x86-no_ssl.msi</span>.</p><P><table border="0" bgcolor="black" cellspacing="0" cellpadding="1" width="90%" align="center"><tr><td><table bgcolor="white" width="100%" border="0" cellspacing="0" cellpadding="6"><TR><td width="60" valign="top"><img src="images/tip_yellow.jpg" width="50" height="54" alt=""></td><TD valign="top">
<p class="docText">If you are on Mac OS X, you already have Apache installed. Open up System Preferences, select the Sharing panel, and click to activate Personal Web Sharing (which is actually Apache). Mac OS X 10.2, 10.3, and 10.4 all come with different versions of Apache, but each works perfectly fine.</p>
</td></tr></table></td></TR></table></P><br></div></li><li><div style="font-weight:normal"><p class="docList">Install Apache using the Installation Wizard.<a name="IDX-CHP-2-0043"></a> 
 Double-click the MSI installer file on your desktop, and you see the installer shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-1">Figure 2-1</a>.</p><a name="learnphpmysql-CHP-2-FIG-1"></a><P><center>
<h5 class="docFigureTitle">Figure 2-1. The Installation Wizard prompts you for basic configuration</H5>
<img border="0" alt="" width="504" height="382" SRC="images/learnphpmysql_0201.jpg">
</center></p><p class="docList">The Installation Wizard walks you through the installation process.</P></div></LI><LI><div style="font-weight:normal"><p class="docList">Accept the license terms by clicking the radio button shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-2">Figure 2-2</a>, and then click Next.</p><a name="learnphpmysql-CHP-2-FIG-2"></a><p><center>
<h5 class="docFigureTitle">Figure 2-2. Apache license terms and conditions for use</h5>
<img border="0" alt="" width="504" height="382" SRC="images/learnphpmysql_0202.jpg">
</center></p></div></li><li><div style="font-weight:normal"><p class="docList">You'll see a "Read This First" box, as shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-3">Figure 2-3</a>. Additionally, this window offers a number of excellent resources related to the web server. Click Next.</p><a name="learnphpmysql-CHP-2-FIG-3"></a><p><center>
<h5 class="docFigureTitle">Figure 2-3. Apache HTTP Server information</h5>
<img border="0" alt="" width="504" height="382" SRC="images/learnphpmysql_0203.jpg">
</center></p></div></li><li><div style="font-weight:normal"><p class="docList">In the blank dialog box shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-4">Figure 2-4</a>, enter all pertinent network information.</P><a name="learnphpmysql-CHP-2-FIG-4"></a><p><center>
<h5 class="docFigureTitle">Figure 2-4. Blank Server Information dialog box</H5>
<img border="0" alt="" width="504" height="382" SRC="images/learnphpmysql_0204.jpg">
</center></P><p class="docList">A sample is provided in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-5">Figure 2-5</a>. Then click Next.</p><a name="learnphpmysql-CHP-2-FIG-5"></a><P><center>
<h5 class="docFigureTitle">Figure 2-5. Sample server information</h5>
<img border="0" alt="" width="504" height="382" SRC="images/learnphpmysql_0205.jpg">
</center></p><P><table border="0" bgcolor="black" cellspacing="0" cellpadding="1" width="90%" align="center"><tr><td><table bgcolor="white" width="100%" border="0" cellspacing="0" cellpadding="6"><TR><td width="60" valign="top"><img src="images/tip_yellow.jpg" width="50" height="54" alt=""></td><TD valign="top">
<p class="docText">Port 80 is the default HTTP port. In other words, when you request <a class="docLink" target="_blank" href="http://www.oreilly.com">http://www.oreilly.com</a>, you're implicitly requesting port 80. By accepting this port, your web requests can be made without specifying a nondefault port.</p>
</td></tr></table></td></TR></table></P><br></div></li><li><div style="font-weight:normal"><p class="docList">In the next screen, shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-6">Figure 2-6</a>, select the setup type. The Typical install will work for your purposes. Click Next.</p><a name="learnphpmysql-CHP-2-FIG-6"></a><P><center>
<h5 class="docFigureTitle">Figure 2-6. Selecting a setup type</H5>
<img border="0" alt="" width="504" height="382" SRC="images/learnphpmysql_0206.jpg">
</center></p></div></LI><LI><div style="font-weight:normal"><p class="docList">Accept the default installation directory, as shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-7">Figure 2-7</a>. Click Next.</P><a name="learnphpmysql-CHP-2-FIG-7"></a><p><center>
<h5 class="docFigureTitle">Figure 2-7. Destination Folder dialog box for the Apache installation files</h5>
<img border="0" alt="" width="504" height="262" SRC="images/learnphpmysql_0207.jpg">
</center></p><p><table border="0" bgcolor="black" cellspacing="0" cellpadding="1" width="90%" align="center"><tr><td><table bgcolor="white" width="100%" border="0" cellspacing="0" cellpadding="6"><tr><td width="60" valign="top"><img src="images/tip_yellow.jpg" width="50" height="54" alt=""></td><td valign="top">
<p class="docText">The default installation directory, <span class="docEmphasis">C:\Program Files\Apache Group\</span>, is both standard and easy to find, especially when you need to make changes to your configuration.</p>
</td></tr></table></TD></tr></table></p><BR></div></LI><li><div style="font-weight:normal"><p class="docList">As <a class="docLink" href="#learnphpmysql-CHP-2-FIG-8">Figure 2-8</a> shows, it's time for the installation to begin. Click Install. The installer installs a variety of modules, and you will see some DOS windows appear and disappear. Click Finish when the installer is done.</P><a name="learnphpmysql-CHP-2-FIG-8"></a><p><center>
<h5 class="docFigureTitle">Figure 2-8. Ready to Install dialog box</h5>
<img border="0" alt="" width="504" height="252" SRC="images/learnphpmysql_0208.jpg">
</center></P></div></li><li><div style="font-weight:normal"><p class="docList">Test your installation by entering <tt>http://localhost/</tt> in your browser's location field. The local host's IP address is 127.0.0.1.</P></div></li><li><div style="font-weight:normal"><p class="docList">After entering the URL in your browser, the default Apache page displays, which is similar to the one shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-9">Figure 2-9</a>. Notice the circled part of the window where it indicates that the installation<a name="IDX-CHP-2-0044"></a> 
 was successful.</P><a name="learnphpmysql-CHP-2-FIG-9"></a><p><center>
<h5 class="docFigureTitle">Figure 2-9. Apache's default index page after installation</h5>
<img border="0" alt="" width="504" height="400" SRC="images/learnphpmysql_0209.jpg">
</center></p><p class="docList">Now that you can serve up web pages, you're ready to add PHP.<a name="IDX-CHP-2-0045"></a> 
</P><P><table border="0" bgcolor="black" cellspacing="0" cellpadding="1" width="90%" align="center"><tr><td><table bgcolor="white" width="100%" border="0" cellspacing="0" cellpadding="6"><tr><td width="60" valign="top"><img src="images/tip_yellow.jpg" width="50" height="54" alt=""></TD><td valign="top">
<p class="docText">Apache is installed along with Mac OS X on Macintoshes. To activate it, go to Sharing under System Preferences, and start Personal Web Sharing.</P>
</td></TR></table></TD></TR></table></p><br></div></li></ol></div>

<a name="learnphpmysql-CHP-2-SECT-1.2"></a>
<h4 id="title-IDARXAXG" class="docSection2Title">2.1.2. Installing PHP</h4>
<p class="docText">Go to <a class="docLink" target="_blank" href="http://www.php.net/downloads.php">http://www.php.net/downloads.php</a> to download the latest version of PHP; both binaries and source code can be found on this web site. You need to download the zip file rather than the Windows installer, because the Windows installer only configures the IIS web server.</p>
<p class="docText">Create a directory for PHP on your desktop. You don't need all the files provided in the archive, so unzip the PHP archive into another temporary location. (A temporary location could be on your desktop, which will be easier to find when you go looking for the files.)</p>
<div style="font-weight:bold"><ol class="docList" type="1"><li><div style="font-weight:normal"><p class="docList">Copy the following files into <span class="docEmphasis">C:\php</span>: <span class="docEmphasis">php.exe, php4ts.dll</span>, and <span class="docEmphasis">php2apache2.dll</span>. The <span class="docEmphasis">php2apache2.dll</span> file is located in the <span class="docEmphasis">sapi</span> directory.</p><p><table border="0" bgcolor="black" cellspacing="0" cellpadding="1" width="90%" align="center"><tr><td><table bgcolor="white" width="100%" border="0" cellspacing="0" cellpadding="6"><tr><td width="60" valign="top"><img src="images/tip_yellow.jpg" width="50" height="54" alt=""></TD><td valign="top">
<p class="docText">Use <span class="docEmphasis">php2apache.dll</span> instead of <span class="docEmphasis">php2apache2.dll</span> if you are using Apache 1.3.<span class="docEmphasis">x</span>.
</p>
</TD></TR></table></td></TR></table></p><br></div></li><LI><div style="font-weight:normal"><p class="docList">Load PHP extensions. If you plan to load PHP extensions, you need to copy the files in the <span class="docEmphasis">extensions</span> directory (or the <span class="docEmphasis">ext</span> directory, for PHP 5.<span class="docEmphasis">x</span>) to <span class="docEmphasis">C:\php</span>, or to a subfolder in <span class="docEmphasis">C:\php</span>any subfolderas long as the <span class="docEmphasis">PHP.ini</span> file is updated to reflect the appropriate directory.</p><p><table border="0" bgcolor="black" cellspacing="0" cellpadding="1" width="90%" align="center"><TR><td><table bgcolor="white" width="100%" border="0" cellspacing="0" cellpadding="6"><tr><TD width="60" valign="top"><img src="images/tip_yellow.jpg" width="50" height="54" alt=""></td><td valign="top">
<p class="docText">MySQL support is now integrated into PHP and doesn't need an extension <span class="docEmphasis">.dll</span>. However, PHP 5 supports MySQL as a separate module for download. Follow the instructions below to make sure that your installation of PHP works before you start experimenting with installing extensions.</p>
</td></TR></table></TD></tr></table></p><br></div></li><LI><div style="font-weight:normal"><p class="docList">To configure PHP, copy <span class="docEmphasis">php.ini-dist</span> from the extracted files into your Windows directorytypically <span class="docEmphasis">C:\winnt</span> or <span class="docEmphasis">C:\Windows</span>and rename it <span class="docEmphasis">php.ini</span>.</p></div></LI><li><div style="font-weight:normal"><p class="docList">Set up PHP to load Apache as a module. To configure Apache to load PHP as a module to parse your PHP scripts, use a text editor to open the Apache configuration file, <span class="docEmphasis">httpd.conf</span>, typically found in <span class="docEmphasis">C:\Program Files\Apache Group\Apache2\conf \</span>. You can use Notepad, as shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-10">Figure 2-10</a>.</P><a name="learnphpmysql-CHP-2-FIG-10"></a><P><center>
<H5 class="docFigureTitle">Figure 2-10. Viewing httpd.conf in Notepad</h5>
<img border="0" alt="" width="549" height="173" SRC="images/learnphpmysql_0210.jpg">
</center></p></div></li><li><div style="font-weight:normal"><p class="docList">Load PHP as an Apache module. Open the <span class="docEmphasis">httpd.conf</span> file in Notepad or another text editor and search for the section that has a series of commented out <tt>LoadModule</tt> statements. You can find this around line 134, as shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-11">Figure 2-11</a>. In Notepad, choose Edit <img src=images/U2192.jpg border=0> Go To . . . <img src=images/U2192.jpg border=0> 134.
</p><a name="learnphpmysql-CHP-2-FIG-11"></a><p><center>
<h5 class="docFigureTitle">Figure 2-11. Notepad httpd.conf file with the LoadModule section highlighted</h5>
<img border="0" alt="" width="549" height="173" SRC="images/learnphpmysql_0211.jpg">
</center></p><p><table border="0" bgcolor="black" cellspacing="0" cellpadding="1" width="90%" align="center"><tr><td><table bgcolor="white" width="100%" border="0" cellspacing="0" cellpadding="6"><tr><td width="60" valign="top"><img src="images/tip_yellow.jpg" width="50" height="54" alt=""></TD><td valign="top">
<p class="docText">Statements prefixed by the hash sign (<tt>#</tt>) in HTML and PHP are considered commented out and can be seen only by you, never your end user in a browser window.</p>
</TD></TR></table></td></TR></table></p><br></div></li><LI><div style="font-weight:normal"><p class="docList">Restart the Apache server by selecting Start <img src=images/U2192.jpg border=0> Apache HTTP Server 2.0.x <img src=images/U2192.jpg border=0> Control Apache Server <img src=images/U2192.jpg border=0> Restart, so that it can read the new configuration directives you placed into <span class="docEmphasis">httpd.conf</span>. Alternatively, in the system tray, double-click on the Apache icon and click the Restart button.</p></div></li><LI><div style="font-weight:normal"><p class="docList">Search for <tt>AddType</tt> in the file, around line 754 (shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-12">Figure 2-12</a>), and add the following line after the last <tt>AddType</tt> statement:</p><pre>
AddType application/x-httpd-php .php
</pre><br>
<a name="learnphpmysql-CHP-2-FIG-12"></a><P><center>
<h5 class="docFigureTitle">Figure 2-12. Notepad httpd.conf file with the AddType section highlighted</h5>
<img border="0" alt="" width="549" height="173" SRC="images/learnphpmysql_0212.jpg">
</center></p></div></li></ol></div>
<p class="docText">To test the installation, do the following:</P>
<div style="font-weight:bold"><ol class="docList" type="1"><LI><div style="font-weight:normal"><p class="docList">Create a PHP file in any text editor, with the following line:</p><pre>
&lt;?php phpinfo(); ?&gt;
</pre><br>
</div></li><li><div style="font-weight:normal"><p class="docList">Save the file as <span class="docEmphasis">phpinfo.php</span>, and then save it under the Apache <span class="docEmphasis">htdocs</span> directory, usually located at <span class="docEmphasis">C:\Program Files\Apache Group\Apache2\htdocs</span>.</P></div></li><LI><div style="font-weight:normal"><p class="docList">Open your browser of choice.</p></div></LI><LI><div style="font-weight:normal"><p class="docList">Access the file you just created by typing <tt>localhost/phpinfo.php</tt> into your browser's location bar. You should see a page of information about your PHP setup, like <a class="docLink" href="#learnphpmysql-CHP-2-FIG-13">Figure 2-13</a>.</P><a name="learnphpmysql-CHP-2-FIG-13"></a><p><center>
<h5 class="docFigureTitle">Figure 2-13. PHP introduction screen</h5>
<img border="0" alt="" width="549" height="471" SRC="images/learnphpmysql_0213.jpg">
</center></p></div></li></ol></div>
<p class="docText">If for some reason this doesn't work, check to see whether your PHP or Apache setup is causing the problem. Go to the command-line prompt and type <tt>cd \php</tt>. The prompt should change to <tt>C:\php</tt>. Then type in <tt>php "C:\Program Files\Apache Group\Apache2\htdocs\phpinfo.php"</tt>, since the file isn't in the <span class="docEmphasis">c:\php</span> directory.</p>
<p class="docText">If invoking PHP from the command line causes a large HTML file with all the PHP configuration information to be displayed, then your PHP setup is fine. The problem is probably your Apache configuration; go ahead and reread the procedure on how to install and configure Apache.</p>
<p><table border="0" bgcolor="black" cellspacing="0" cellpadding="1" width="90%" align="center"><tr><td><table bgcolor="white" width="100%" border="0" cellspacing="0" cellpadding="6"><tr><td width="60" valign="top"><img src="images/tip_yellow.jpg" width="50" height="54" alt=""></td><td valign="top">
<p class="docText">If you are on Mac OS X, you have PHP preinstalled on your computer. You need to edit the Apache configuration file to enable PHP in much the same way you edited the PC text file.</P>
</td></tr></table></TD></TR></table></p><BR>

<a name="learnphpmysql-CHP-2-SECT-1.3"></a>
<h4 id="title-IDAP5AXG" class="docSection2Title">2.1.3. Installing MySQL 4.1</h4>
<a name="IDX-CHP-2-0046"></a> 

<p class="docText">The final component you need to develop and test pages on your local computer is MySQL. Now download the MySQL Installer.</p>
<div style="font-weight:bold"><ol class="docList" type="1"><LI><div style="font-weight:normal"><p class="docList">Download the MySQL binaries. Both the binaries and the source code can be found at <a class="docLink" target="_blank" href="http://dev.mysql.com/downloads/">http://dev.mysql.com/downloads/</a>. The link takes you to a page where you can enter personal info, or just click No Thanks to download the file. A number of download locations (or mirrors) are available; select one. Download the recommended version for the Windows Essentials (x86) MySQL 4.1 Installer. Save the installer file to your desktop.</p></div></li><LI><div style="font-weight:normal"><p class="docList">Double-click the MSI installer file on your desktop. A setup wizard, shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-14">Figure 2-14</a>, walks you through the installation<a name="IDX-CHP-2-0047"></a> 
 process. (The install process for MySQL 5.0 is the same as it is for MySQL 4.1.) Click Next.</p><a name="learnphpmysql-CHP-2-FIG-14"></a><p><center>
<H5 class="docFigureTitle">Figure 2-14. The Setup Wizard prompts you for configuration settings</h5>
<img border="0" alt="" width="504" height="380" SRC="images/learnphpmysql_0214.jpg">
</center></p></div></li><li><div style="font-weight:normal"><p class="docList">Select Typical installation by clicking the Typical radio button shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-15">Figure 2-15</a>, and then click Next.</P><a name="learnphpmysql-CHP-2-FIG-15"></a><P><center>
<h5 class="docFigureTitle">Figure 2-15. Select a setup type</h5>
<img border="0" alt="" width="504" height="380" SRC="images/learnphpmysql_0215.jpg">
</center></p></div></li><LI><div style="font-weight:normal"><p class="docList">Click Install on the Ready to Install the Program dialog box shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-16">Figure 2-16</a>.</p><a name="learnphpmysql-CHP-2-FIG-16"></a><P><center>
<h5 class="docFigureTitle">Figure 2-16. Confirm installation folder</H5>
<img border="0" alt="" width="504" height="380" SRC="images/learnphpmysql_0216.jpg">
</center></P></div></LI><li><div style="font-weight:normal"><p class="docList">The setup program next will ask you to create a MySQL.com account, as shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-17">Figure 2-17</a>. Select Skip Sign-Up and click Next, or sign up for an account, which provides access to a monthly newsletter as well as the ability to post bugs and comments on the online forums.</p><a name="learnphpmysql-CHP-2-FIG-17"></a><p><center>
<h5 class="docFigureTitle">Figure 2-17. The MySQL.com account provides newsletters and bug reporting resources</h5>
<img border="0" alt="" width="504" height="380" SRC="images/learnphpmysql_0217.jpg">
</center></p></div></li><li><div style="font-weight:normal"><p class="docList">Select the "Configure the MySQL Server now" checkbox shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-18">Figure 2-18</a>, and then click Finish.</p><a name="learnphpmysql-CHP-2-FIG-18"></a><p><center>
<h5 class="docFigureTitle">Figure 2-18. Configure the MySQL Server</h5>
<img border="0" alt="" width="504" height="380" SRC="images/learnphpmysql_0218.jpg">
</center></p><p class="docList">This brings up the dialog box shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-19">Figure 2-19</a>, where you can just click Next.</p><a name="learnphpmysql-CHP-2-FIG-19"></a><P><center>
<h5 class="docFigureTitle">Figure 2-19. The Configuration Wizard customizes the database settings</h5>
<img border="0" alt="" width="504" height="380" SRC="images/learnphpmysql_0219.jpg">
</center></P></div></LI><li><div style="font-weight:normal"><p class="docList">Select the Standard Configuration radio button from the dialog shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-20">Figure 2-20</a>. Click Next.</P><a name="learnphpmysql-CHP-2-FIG-20"></a><p><center>
<h5 class="docFigureTitle">Figure 2-20. Choose the level of detail dialog box</h5>
<img border="0" alt="" width="504" height="380" SRC="images/learnphpmysql_0220.jpg">
</center></P></div></li><li><div style="font-weight:normal"><p class="docList">In the dialog shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-21">Figure 2-21</a>, check both Install As Window Service and "Launch the MySQL Server automatically." Click Next.</P><a name="learnphpmysql-CHP-2-FIG-21"></a><p><center>
<h5 class="docFigureTitle">Figure 2-21. How to launch MySQL window</H5>
<img border="0" alt="" width="504" height="380" SRC="images/learnphpmysql_0221.jpg">
</center></p></div></li><li><div style="font-weight:normal"><p class="docList">Enter a password for the root user in the password and confirm fields shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-22">Figure 2-22</a>. Click Next. You do not need the Anonymous Account since you can do everything with named accounts.</p><a name="learnphpmysql-CHP-2-FIG-22"></a><P><center>
<H5 class="docFigureTitle">Figure 2-22. Security settings for the database window</h5>
<img border="0" alt="" width="504" height="380" SRC="images/learnphpmysql_0222.jpg">
</center></p></div></li><li><div style="font-weight:normal"><p class="docList">Click Execute, as shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-23">Figure 2-23</a>.</P><a name="learnphpmysql-CHP-2-FIG-23"></a><p><center>
<H5 class="docFigureTitle">Figure 2-23. Commit the configuration settings window</h5>
<img border="0" alt="" width="504" height="380" SRC="images/learnphpmysql_0223.jpg">
</center></P></div></LI><LI><div style="font-weight:normal"><p class="docList">Click Finish, as shown in <a class="docLink" href="#learnphpmysql-CHP-2-FIG-24">Figure 2-24</a>. MySQL is now configured and running on your computer.</p><a name="learnphpmysql-CHP-2-FIG-24"></a><p><center>
<h5 class="docFigureTitle">Figure 2-24. Installation is complete</h5>
<img border="0" alt="" width="504" height="380" SRC="images/learnphpmysql_0224.jpg">
</center></p></div></li></ol></div>
<p class="docText">At this point, all critical componentsApache, PHP 5.0, and MySQL 4.1are installed.</p>
<p><table border="0" bgcolor="black" cellspacing="0" cellpadding="1" width="90%" align="center"><tr><td><table bgcolor="white" width="100%" border="0" cellspacing="0" cellpadding="6"><tr><td width="60" valign="top"><img src="images/tip_yellow.jpg" width="50" height="54" alt=""></td><td valign="top">
<p class="docText">The wizard will inform you of basic problems during installation, such as running out of free disk space or not having proper permissions on your system to install MySQL.</P>
</td></tr></table></TD></TR></table></p><BR>


</TD></TR></table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=learnphpmysql-CHP-2.html><img src="images/prev.gif" width="60" height="17" border="0" align="absmiddle" alt="Previous Page"></a>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=learnphpmysql-CHP-2-SECT-2.html><img src="images/next.gif" width="60" height="17" border="0" align="absmiddle" alt="Next Page"></a>
</div></td></tr></table>
<script type="text/javascript"><!--
google_ad_client = "pub-0203281046321155";
google_alternate_ad_url = "http://www.bookhtml.com/adbrite.htm";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="4867465545";
google_color_border = "FFFFFF";
google_color_link = "0000FF";
google_color_bg = "FFFFFF";
google_color_text = "000000";
google_color_url = "0000FF";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</html>
